﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainMaster.master" AutoEventWireup="true" CodeFile="NewPendingObjects.aspx.cs" Inherits="NewPublisher" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<%@ Register Src="~/GoogleMapForASPNet.ascx" TagName="GoogleMapForASPNet" TagPrefix="uc1" %>
<%@ Register assembly="EO.Web" namespace="EO.Web" tagprefix="eo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <title>طلبات الشركة</title>
    <link href="jqModal.css" rel="stylesheet" type="text/css" />

<%--    <script src="jquery-1.3.2.min.js" type="text/javascript"></script>--%>
    <script src="jqModal.js" type="text/javascript"></script>
<script type="text/javascript">

    function there() {

        $("#dialog").jqm({ modal: true }).jqmShow();


    }
   
       
    </script>
<style type="text/css">
      tr .tabbone4{
	 background-color:#028ac5;
	 font-size:11px;
	 line-height:20px;
	 font-family:Tahoma;
  	 color:#fff;
  	 text-align:right;
	
}
.adel4{
	background-color:#ededed;
	font-size:10px;
	color:#084f86;
	font-family:Tahoma;
	height:30px;
	text-align:  right;
}
         .zr3 {
	background-image:url('images/button2.png');
	display:block;
	float:right;
	 padding: 0px 10px 0px 10px;
	height:21px;
	text-align:center;
	color:#fff;
	text-shadow:1px 1px 0px #003a5e;
	margin-right:2px;
	line-height:19px;
	font-weight:bold;
	text-decoration:none;
	font-family:Tahoma;
	font-size:12px;


}
.zr3:hover ,.zr3:active {
	background-image:url('images/button2.png');
	text-shadow:1px 1px 0px #003a5e;
	background-position:0px -21px;
	
}
  .stylelabel3
       {
       	color:#064c66;
	 font-weight:bold;
	 direction:rtl;
	 text-align:right;
       	}
             .tab3{
	width:815px;
 direction:rtl;
 border:1px #ccc solid;
 border-radius:5px;
 }

tr .tabbone3{
	 background-color:#028ac5;
	 font-size:11px;
	 line-height:20px;
	 font-family:Tahoma;
  	 color:#fff;
  	 text-align:center;
	
}
 .req3
       {
           color:Red;
       } 
.adel3{
	background-color:#ededed;
	font-size:10px;
	color:#084f86;
	font-family:Tahoma;
	height:30px;
	text-align:  center;
}
.he3{
	background-color:#fff;
	padding:5px;
	font-family:Tahoma;
	font-size:14px;
	font-weight:bold;
}
.txt3
{
    border:1px solid black;
    margin-bottom:5px;
    margin-top:5px;
    }
        .jqmWindow {
    display: none;
    
    position: fixed;
    top: 17%;
    left: 50%;
    
    margin-left: -300px;
    width: 450px;
    
    background-color: #EEE;
    color: #333;
    border: 1px solid black;
    padding: 12px;
}
.req
{
    color:Red;
    }
        .lok
     {
	display: none;
	color: red;
     }
        
     .jqmWindow {
    display: none;
    
    position: fixed;
    top: 17%;
    left: 50%;
    
    margin-left: -200px;
    width: 450px;
    
    background-color: #fff;
    color: #333;
    border: 1px solid black;
    padding: 12px;
}

.jqmOverlay { background-color: #000; }

/* Fixed posistioning emulation for IE6
     Star selector used to hide definition from browsers other than IE6
     For valid CSS, use a conditional include instead */
* html .jqmWindow 
{
     position: absolute;
     top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 120) + 'px');
}
    .style1
    {
        width: 152px;
    }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <br />
    <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" 
        meta:resourcekey="DataList1Resource1">
        <ItemTemplate>
     
        <table width="100%"   style="width:300px;
 direction:ltr;
 float:right;
 border:1px #ccc solid;
 border-radius:5px;"> 
        <tr>
        <td style="padding:5px; width:10px;"><asp:Label CssClass="he3" ID="countLabel" 
                runat="server" Text='<%# Eval("count") %>' 
                meta:resourcekey="countLabelResource1" /></td>
        <td style="padding:5px; width:100px;" align="right"> <asp:Label ID="Label4" CssClass="he3" runat="server" Text="الاجمالى" meta:resourcekey="sumLabel"></asp:Label></td>
        <td style="padding:5px; width:100px;" align="left"> 
            <asp:Label ID="typeLabel" runat="server" CssClass="stylelabel3" 
              Text='<%# GetLoc(Eval("type").ToString()) %>' 
                  />
                  <asp:Label ID="mylabel" runat="server" CssClass="stylelabel3" Visible="false"
              Text='<%# Eval("type") %>' 
                  />
         </td>
        </tr>
        </table>
            <br /><br />
            <br />
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                DataSourceID="SqlDataSource3" EnableModelValidation="True"  GridLines="None"
                DataKeyNames="id" meta:resourcekey="GridView1Resource1">
                <Columns>
                    <asp:TemplateField HeaderText="type" SortExpression="type" 
                        meta:resourcekey="TemplateFieldResource1">
                    <HeaderTemplate>
                    <table class="tab3">
                    <tr>
                    <td class="tabbone3" style="padding:5px; width:150px;">
                    <asp:Label runat="server" Text="النوع" meta:resourcekey="typelabel"/>
                    
                    </td>
                    <td class="tabbone3" style="padding:5px; width:200px;"><asp:Label ID="Label5" runat="server" Text="الاسم" meta:resourcekey="NameLabel"/></td>
                    <td class="tabbone3" style="padding:5px; width:150px;"><asp:Label ID="Label6" runat="server" Text="الشركة" meta:resourcekey="companyLabel"/></td>
                    <td class="tabbone3" style="padding:5px; width:150px;"><asp:Label ID="Label7" runat="server" Text="المستخدم" meta:resourcekey="UserNameLabel"/></td>
                    <td class="tabbone3" style="padding:5px; width:150px;"><asp:Label ID="Label8" runat="server" Text="حذف" meta:resourcekey="DeleteLabel"/></td>
                    </tr>
                    </table>
                    </HeaderTemplate>
                        <ItemTemplate>
                        <table class="tab3">
                        <tr>
                        <td  class="adel3" style="padding:5px; width:150px;">            
                            <asp:Label ID="Label1" runat="server" 
                                Text='<%# GetLoc(Eval("type").ToString()) %>' 
                                meta:resourcekey="Label1Resource1"></asp:Label>
                </td>
                        <td class="adel3" style="padding:5px; width:200px;">   
                            <asp:HyperLink ID="HyperLink1" runat="server"
                                NavigateUrl='<%# getLink(Eval("type").ToString(),(int)Eval("id")) %>' 
                                Text='<%# Eval("name") %>' meta:resourcekey="HyperLink1Resource1"></asp:HyperLink>
                </td>
                        <td class="adel3" style="padding:5px; width:150px;">       <asp:Label ID="Label2" 
                                runat="server" Text='<%# Bind("company") %>' meta:resourcekey="Label2Resource1"></asp:Label>
                    </td>
                        <td class="adel3" style="padding:5px; width:150px;">       <asp:Label ID="Label3" 
                                runat="server" Text='<%# Bind("username") %>' 
                                meta:resourcekey="Label3Resource1"></asp:Label>
                     </td>
                        <td class="adel3" style="padding:5px; width:150px;">         <asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" meta:resourcekey="DeleteLabel"
                                CommandName="Delete" Text="Delete"></asp:LinkButton>
                                 <asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" 
                                                    ConfirmText="<%$ Resources:Resource, delconfirm %>" TargetControlID="DeleteButton" />
                </td>
                        </tr>
                        </table>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="Select p.id,[type],name ,p.companyId, c.company , username from Ragami.pendingobjects  p left join Ragami.companies c on c.id = p.companyId where [type] = @type" 
                DeleteCommand="delete pendingobjects where id=@id" 
                ondeleted="SqlDataSource3_Deleted">
                <DeleteParameters>
                    <asp:Parameter Name="id" />
                </DeleteParameters>
                <SelectParameters>
                    <asp:ControlParameter ControlID="mylabel" Name="type" PropertyName="Text" />
                </SelectParameters>
            </asp:SqlDataSource>
            <br />
        </ItemTemplate>
    </asp:DataList>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="Select [type], Count(*) as [count]   from pendingobjects group by [type]">
    </asp:SqlDataSource>
    
</asp:Content>

